﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using System.Configuration;
using Data.Interfaces.Callback;
using Data.Interfaces;
namespace Data
{
    public static class Services
    {
/*
        public static IConnectService serverConnectService;
        public static IFightService serverFightService;

        public static IConnectService GetConnectService(ICConnectService callback)
        {
            if (serverConnectService == null)
            {
                EndpointAddress address = new EndpointAddress(ConfigurationSettings.AppSettings["ConnectServiceServerAdress"]);
                DuplexChannelFactory<IConnectService> duplexChannel = new DuplexChannelFactory<IConnectService>(callback, new NetTcpBinding(SecurityMode.None), address);
                serverConnectService = duplexChannel.CreateChannel();
            }
            return serverConnectService;
        }

        public static IFightService GetFightService(ICFightService callback)
        {
            if (serverFightService == null)
            {
                EndpointAddress address = new EndpointAddress(ConfigurationSettings.AppSettings["FightServiceServerAdress"]);
                DuplexChannelFactory<IFightService> duplexChannel = new DuplexChannelFactory<IFightService>(Client.cFightService, new NetTcpBinding(SecurityMode.None), address);
                serverFightService = duplexChannel.CreateChannel();
            }
            return serverFightService;
        }
 * */
    }
}
